package com.example.lemis.model.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Map;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.example.lemis.model.dto.DoorplateInsertDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 管理门牌每次审批数据
 * </p>
 *
 * @author lxp
 * @since 2025-06-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("doorplate_apply")
@ApiModel(value="DoorplateApply对象", description="管理门牌每次审批数据")
public class DoorplateApply implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("gmt_created")
    private LocalDateTime gmtCreated;

    @TableField("gmt_modified")
    private LocalDateTime gmtModified;

    @TableField("creator_id")
    private Long creatorId;

    @TableField("is_deleted")
        @TableLogic
    private Boolean deleted;

    @TableField("code")
    private Long code;

    @TableField("lng")
    private BigDecimal lng;

    @TableField("lat")
    private BigDecimal lat;

    @TableField("clazz_id")
    private Long clazzId;

    @TableField("street_id")
    private Long streetId;

    @TableField("levels")
    private Long levels;

    @TableField("status")
    private Long status;

    @TableField("doorplate_id")
    private Long doorplateId;

    @TableField("remark")
    private String remark;

    public DoorplateInsertDTO toDoorplateInsertDTO() {
        DoorplateInsertDTO dto = new DoorplateInsertDTO();
        dto.setClazzId(this.getClazzId());
        dto.setStreetId(this.getStreetId());
        dto.setUserId(this.getCreatorId());
        dto.setCode(this.getCode());
        dto.setCodeStatus(String.valueOf(this.getStatus()));
        dto.setLng(this.getLng());
        dto.setLat(this.getLat());
        dto.setRemark(this.getRemark());
        return dto;
    }

}
